var AjaxCached = Ajax.extend({
	initialize: function(url, options){
		this.parent(url, options);
		this.addEvent('onSuccess', this.saveCache);
	},
	get: function(data){
		if(AjaxCached.hash.hasKey(this.url)){
			this.response = AjaxCached.hash.get(this.url);
			this.onComplete();
		}
		else{
			return this.request(data);
		}
	},
	saveCache: function(responseText, responseXml){
		AjaxCached.hash.set(this.url, {text: responseText, xml: responseXml});
	}
});
AjaxCached.hash = new Hash({});